<template>
  <div id="app">
    <h1 v-text='title'></h1>
    <!--<hello></hello>-->
    <input type="text"  />
    <ul>
    	<li v-for='item in items' v-text='item.label' v-bind:class="{isFinished:item.isFinished}" @click='Finish(item)'></li>
    </ul>
  </div>
</template>

<script>
import Hello from './components/Hello'

export default {
  name: 'app',
  data:function(){
  	return {
  		title:'this is a todo',
  		items:[
  			{
  				label:'coding',
  				isFinished:false
  			},
  			{
  				label:'walking',
  				isFinished:true
  			}
  		]
  	}
  },
  	methods:{
  		Finish:function(item){
  			item.isFinished = !item.isFinished
  		}
  	}
//components: {
//  Hello
//}
}
</script>

<style>
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 160px;
  width: 500px;
  margin: 0 auto;
}
.isFinished{
	text-decoration: underline;
}
</style>
